<template>
  <div class="dashboard-container">
    <div class="dashboard-text">
      运维管理系统
    </div>

    <el-row :gutter="30">
      <el-col :span="8">
        <el-card class="card-margin box-card">
          <div slot="header">
            <span>网格数量</span>
          </div>
          <gener class="body bg" />
        </el-card>
      </el-col>
      <el-col :span="8">
        <el-card class="card-margin box-card">
          <div slot="header">
            <span>网格人员</span>
          </div>
          <div class="body bg zjflex">
            <div class="contentBox center-col-flex">

              <div class="contentcen"><div class="el-icon-user-solid" />网格长</div>
              <span class="titilbot">应到人数: &nbsp;<span class="tipsnum">100</span></span>
              <span class="titilbot">实到人数: &nbsp;<span class="tipsnum">91</span></span>

            </div>
            <div class="contentBox center-col-flex">
              <div class="contentcen"><div class="el-icon-user-solid" />片长</div>
              <span class="titilbot">应到人数: &nbsp;<span class="tipsnum">201</span></span>
              <span class="titilbot">实到人数: &nbsp;<span class="tipsnum">193</span></span>
            </div>
            <div class="contentBox center-col-flex">
              <div class="contentcen"><div class="el-icon-user-solid" />组长</div>
              <span class="titilbot">应到人数: &nbsp;<span class="tipsnum">140</span></span>
              <span class="titilbot">实到人数: &nbsp;<span class="tipsnum">125</span></span>
            </div>
            <div class="contentBox center-col-flex">
              <div class="contentcen"><div class="el-icon-user-solid" />站长</div>
              <span class="titilbot">应到人数: &nbsp; <span class="tipsnum">52</span></span>
              <span class="titilbot">实到人数: &nbsp;<span class="tipsnum">49</span></span>
            </div>
          </div>

        </el-card>
      </el-col>
      <el-col :span="8">
        <el-card class="card-margin box-card">
          <div slot="header">
            <span>垃圾站长</span>
          </div>
          <div class="zjflex ">
            <div class="contentBox center-flex ">
              <el-badge :value="12" class="item" type="primary">
                <span>2250</span>
                <div class="titilbot">
                  大型
                </div>
              </el-badge>

            </div>
            <div class="contentBox center-flex">
              <el-badge :value="16" class="item" type="primary">
                <span class="titlefont">38000</span>
                <div class="titilbot">
                  中型
                </div>
              </el-badge>
            </div>
            <div class="contentBox center-flex">
              <el-badge :value="18" class="item" type="primary">
                <span class="titlefont">180000</span>
                <div class="titilbot">
                  小型
                </div>
              </el-badge>
            </div>
            <div class="contentBox center-flex">
              <el-badge :value="18" class="item" type="warning">
                <span class="titlefont2">1500</span>
                <div class="titilbot">
                  微型
                </div>
              </el-badge>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>
    <el-row :gutter="30">
      <el-col :span="12">
        <el-card class="card-margin box-card">
          <div slot="header">
            <span>这个鸡翅不新鲜</span>
          </div>
          <collection class="body bg " />
        </el-card>
      </el-col>
      <el-col :span="12">
        <el-card class="card-margin box-card">
          <div slot="header">
            <span>咱家有钱啦</span>
          </div>
          <el-carousel indicator-position="outside" class="body">
            <el-carousel-item v-for="item in imagesbox" :key="item.id">
              <img :src="item.idView" class="image">
            </el-carousel-item>
          </el-carousel>

        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import gener from './GridNumber'
import collection from './collectionTransportation'
export default {
  name: 'Dashboard',
  components: {
    gener,
    collection
  },
  data() {
    return {

      imagesbox: [
        { id: 0, idView: require('@/assets/recycleimages/recycle.png') },
        { id: 1, idView: require('@/assets/recycleimages/recycle.png') },
        { id: 2, idView: require('@/assets/recycleimages/recycle.png') },
        { id: 3, idView: require('@/assets/recycleimages/recycle.png') }

      ]
    }
  },
  computed: {
    ...mapGetters(['name'])
  },
  methods: {
    changeCellStyle(row, column, rowIndex, columnIndex) {
      // 列的label的名称
      if (row.column.label === '金额') {
        return 'color:var(--c-primary-l)' // 修改的样式
      } else {
        return {
          'font-size': '0.5em'
        }
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
.bg {
  background-color: #F5F5F5;
}
.image{
   width: 100%;
   height: 100%;
}

.el-col {
  flex: 1;
  margin-bottom: 20px;
}
// .el-card {
// }
.body{
  // width: 100%  !important;
  height: 350px !important;
}
.tipsnum{
  font-size: 14px;
  color: blue ;
}
.contentcen{
  font-size: 28px;
  color:#7AB2E6;

}
.titilbot{
  text-align: center;
  font-size: 14px;
  color:#B1BECE;
}
.c
.number {
  display: flex;
  flex-wrap: wrap;
}
 .content{
    width: 100%;
    padding: 10px 20px;
    margin-top: 10px;
    &.green{
      background: rgba($color: #88CA7A, $alpha: .3);
      backdrop-filter: blur(5px);
    }
    &.black{
      background: var(--nc-background-400);
      backdrop-filter: blur(5px);
    }
    .circle{
      width: 60px;
      height: 60px;
      background: rgba($color: #0b3704, $alpha: .7);
      border-radius: 50%;
      box-shadow: 0 0 5px white;
      .num{
        font-size: var(--f-s);
        font-weight: bolder;
        color: var(--c-primary-l);
      }
      .name{
        font-size: var(--f-xs);
        margin-bottom: 5px;
      }
    }
  }
// 轮播图
 .el-carousel__item h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    line-height: 200px;
    margin: 0;
  }

  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }

  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }

</style>
